#include <deque>
#include <list>
#include <iostream>

int main ()
{
    //std::list<int> ll;
    //std::list<int>::iterator pos;
    std::deque<int> ll;
    std::deque<int>::iterator pos;
    for (int i = 0; i < 10000000; ++i)
    {
	ll.push_front (i);
    }	
    pos = ll.begin();
    int n = 0;
    for (; pos != ll.end();)
    {
	//ll.pop_front ();
	pos = ll.erase(pos);
    }
    std::cout << ll.size() << std::endl;
}
